<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>积分平台</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/attenStatic.css"/>
		<script src="__INDEX__/js/lib/font.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body >
	<input type="text" value="{$types}" id="ninxing" style="display: none">
	    <header class="mui-bar mui-bar-nav">
	        <a class="mui-icon mui-icon-left-nav mui-pull-left goindex" style="color: #ffffff"></a>
	        <div class="mui-title">
				{if $types==1}
	        	<div class="chakan active">每日<span class="chakan-line"></span></div>
	        	<div class="chakan">每月<span class="chakan-line"></span></div>
				{else}
				<div class="chakan">每日<span class="chakan-line"></span></div>
				<div class="chakan active">每月<span class="chakan-line"></span></div>
				{/if}
	        </div>
	    </header>
		{if $types==1}
	    <div class="mui-content show">
			{else}
			<div class="mui-content">
			{/if}
	    	<div class="date">
	    		<div class="dateCont">
	    			<span class="dateJianTou mui-pull-left mui-icon mui-icon-back zuo" dataY="{$day[0]}" dataM="{$day[1]}" dataD="{$day[2]}"></span>
	    			<span class="dateTime">{$day[0]}年{$day[1]}月{$day[2]}日</span>
	    			<span class="dateJianTou mui-pull-right mui-icon mui-icon-forward you" dataY="{$day[0]}" dataM="{$day[1]}" dataD="{$day[2]}"></span>
	    		</div>
	    	</div>
	    	<div class="dep">
	    		<p class="mui-pull-left ">
	    			<span>{$department['company_name']}/{$department['departmen_name']}</span>
	    		</p>
	    		<p class="mui-pull-right">
	    			<span>{$zong}人</span>
	    			<i class="mui-icon mui-icon-arrowright"></i>
	    		</p>
	    	</div>
	    	<div class="modular" >
	    		<div class="top-title">
					<span class="name">姓名</span>
					<span class="shangban">上班</span>
					<span class="xiaban">下班</span>
				</div>
				<div id="wrapper" class="scrollCont">
		    		<div class="cont" id="scroller">
		    			<ul>
		    				<!--<li>-->
		    					<!--<div class="dateContent">-->
		    						<!--<span class="dateName">王天琦</span>-->
		    						<!--<span class="contChenGong mui-icon mui-icon-checkmarkempty"></span>-->
		    						<!--<span class="contCuoWu mui-icon mui-icon mui-icon-closeempty"></span>-->
		    					<!--</div>-->
		    				<!--</li>-->
							{foreach $data as $key=>$value}
		    				<li>
		    					<div class="dateContent">
		    						<span class="dateName">{$key}</span>
									{if $value['toWork']}
										{if $value['toWork']=='未到打卡时间'}
										{elseif $value['toWork']['leave']==1}
										<span class="contChidao">请假</span>
										{elseif $value['toWork']['absenteeism']==1}
										<span class="contChidao">旷工</span>
										{elseif $value['toWork']['overtime']==1}
										<span class="contChidao">加班</span>
										{elseif $value['toWork']['late']==1}
										<span class="contChidao">迟到</span>
										{else}
										<span class="contChenGong mui-icon mui-icon-checkmarkempty"></span>
										{/if}
									{else}
									<span class="contCuoWu mui-icon mui-icon mui-icon-closeempty"></span>
									{/if}
		    						{if $value['offWork']}
										{if $value['offWork']=='未到打卡时间'}
										{elseif $value['offWork']['leave']==1}
										<span class="contChidao">请假</span>
										{elseif $value['offWork']['overtime']==1}
										<span class="contChidao">加班</span>
										{elseif $value['offWork']['early_retreat']==1}
										<span class="contChidao">早退</span>
										{else}
										<span class="contChenGong mui-icon mui-icon-checkmarkempty"></span>
										{/if}
									{else}
									<span class="contCuoWu mui-icon mui-icon mui-icon-closeempty"></span>
									{/if}
		    						<!--<span class="contZaotui">早退</span>-->
		    					</div>
		    				</li>
							{/foreach}
		    			</ul>
		    		</div>
	    		</div>
	    		<!--<div class="date-footer">-->
	    			<!--<p class="punchOk">正常打卡<i></i><span>1天</span></p>-->
	    			<!--<p class="punchOut">请假<i></i><span>1天</span></p>-->
	    			<!--<p class="punchNo">迟到/早退<i></i><span>16次</span></p>-->
	    		<!--</div>-->
	    	</div>
	    </div>
			{if $types==2}
			<div class="mui-content show">
			{else}
	    <div class="mui-content">
			{/if}
	    	<div class="date">
	    		<div class="dateCont">
	    			<span class="dateJianTou mui-pull-left mui-icon mui-icon-back zuoyue" dataY="{$month[0]}" dataM="{$month[1]}"></span>
	    			<span class="dateTime">{$month[0]}年{$month[1]}月</span>
	    			<span class="dateJianTou mui-pull-right mui-icon mui-icon-forward youyue" dataY="{$month[0]}" dataM="{$month[1]}"></span>
	    		</div>
	    	</div>
	    	<div class="dep">
	    		<p class="mui-pull-left ">
	    			<span>{$department['company_name']}/{$department['departmen_name']}</span>
	    		</p>
	    		<p class="mui-pull-right">
	    			<span>{$zong}人</span>
	    			<i class="mui-icon mui-icon-arrowright"></i>
	    		</p>
	    	</div>
	    	<div class="pre">
	    		<div class="pre-top">
	    			<div class="pre-static-one">
		    			<div class="pre-static-tow">
		    				<div class="pre-static-three">
		    					<div class="pre-static-num">
		    						<span class="service">
										{$quanqing}
									</span>
		    						<span class="fenge">/</span>
		    						<span class="days">{$setting}</span>
		    					</div>
		    					<p>全勤人数/天数</p>
		    				</div>
		    			</div>
		    		</div>
	    		</div>
	    		<div class="pre-bottom">
	    			<div class="pre-row-info">
	    				<p>打卡情况(人/次)</p>
	    				<p>上班</p>
	    				<p>下班</p>
	    			</div>
	    			<div class="pre-row">
	    				<p>正常打卡</p>
	    				<p><i class="chengong-color"></i><span>{$zhenchang['toWork']}</span></p>
	    				<p><i class="chengong-color"></i><span>{$zhenchang['offWork']}</span></p>
	    			</div>
	    			<div class="pre-row">
	    				<p>迟到／早退</p>
	    				<p><i class="chidao-color"></i><span>{$chidao['late']}</span></p>
	    				<p><i class="chidao-color"></i><span>{$chidao['early_retreat']}</span></p>
	    			</div>
	    			<div class="pre-row">
	    				<p>未打卡</p>
	    				<p><i class="weidaka-color"></i><span>{$wei['toWork']}</span></p>
	    				<p><i class="weidaka-color"></i><span>{$wei['offWork']}</span></p>
	    			</div>
	    			<div class="pre-row">
	    				<p>请假</p>
	    				<p><i class="qingjia-color"></i><span>{$qingjia['toWork']}</span></p>
	    				<p><i class="qingjia-color"></i><span>{$qingjia['offWork']}</span></p>
	    			</div>
	    		</div>
	    	</div>
	    </div>
		<script src="__INDEX__/js/lib/zepto.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.view.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/layer_mobile/layer.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/lib/iscroll.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/attenStatic.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/maowenke.js" type="text/javascript" charset="utf-8"></script>
		<script>

		</script>
	<script>
        $(".goindex").on('tap',function () {
            window.location.href = "{:url('index/checkwork')}";
        });
		$(".zuo").on('tap',function () {
            var $year = parseInt($(this).attr('dataY'));
            var $month = parseInt($(this).attr('dataM'));
            var $days = parseInt($(this).attr('dataD'));
			if($days==1){
			    if($month==1){
                    $year = $year-1;
                    $month = 12;
                    $days  = new Date($year,$month,0).getDate();
				}else{
			        $month = $month-1;
                    $days  = new Date($year,$month,0).getDate();
				}
			}else{
                $days = $days-1;
			}
			if($month<10){
			    $month = '0'+$month;
			}
			if($days<10){
                $days = '0'+$days;
			}
			window.location.href = "{:url('index/attenstatic')}?dYear="+$year+'&dMonth='+$month+'&dDay='+$days+"&mYear={$month[0]}&mMonth={$month[1]}&types=1";
		});
		$(".you").on('tap',function () {
            var $year = parseInt($(this).attr('dataY'));
            var $month = parseInt($(this).attr('dataM'));
            var $days = parseInt($(this).attr('dataD'));
            var dass  = new Date($year,$month,0).getDate();
            if($days==dass){
                if($month==12){
                    $year = $year+1;
                    $month = 1;
                    $days  = 1;
				}else{
                    $days = 1;
                    $month = $month+1;
				}
			}else{
                $days = $days+1;
			}
			if($month<10){
                $month = '0'+$month;
			}
			if($days<10){
                $days = '0'+$days;
			}
            var $time = new Date();
            var year  = $time.getFullYear();
            var month = $time.getMonth()+1;
            var day  = $time.getDate();
            if(month<10){
                month = '0'+month;
			}
			if(day<10){
                day = '0'+day;
			}
            if(parseInt($year+''+$month+''+$days)>parseInt(year+''+month+''+day)){
			    mui.alert($month+'月'+$days+'日还没到');
			}else{
                window.location.href = "{:url('index/attenstatic')}?dYear="+$year+'&dMonth='+$month+'&dDay='+$days+"&mYear={$month[0]}&mMonth={$month[1]}&types=1";
			}
        });
        $(".zuoyue").on('tap',function () {
            var $year = parseInt($(this).attr('dataY'));
            var $month = parseInt($(this).attr('dataM'));
            if($month==1){
                $month = 12;
                $year  = $year-1;
			}else{
                $month = $month-1;
			}
			if($month<10){
                $month = '0'+$month;
			}
			window.location.href = "{:url('index/attenstatic')}?dYear={$day[0]}&dMonth={$day[1]}&dDay={$day[2]}&mYear="+$year+'&mMonth='+$month+'&types=2';
        });
        $(".youyue").on('tap',function () {
            var $year = parseInt($(this).attr('dataY'));
            var $month = parseInt($(this).attr('dataM'));
            if($month==12){
                $year = $year+1;
                $month = 1;
			}else{
                $month = $month+1;
			}
			if($month<10){
                $month = '0'+$month;
			}
			var time = new Date();
			var year = time.getFullYear();
			var month = time.getMonth()+1;
			if(month<10){
			    month='0'+month;
			}
			if(parseInt($year+''+$month)>parseInt(year+''+month)){
			    mui.alert($month+'月还没到');
			}else{
                window.location.href = "{:url('index/attenstatic')}?dYear={$day[0]}&dMonth={$day[1]}&dDay={$day[2]}&mYear="+$year+'&mMonth='+$month+'&types=2';
			}
        })
	</script>
	</body>
</html>
